import 'package:flutter/material.dart';
import 'package:liquid_progress_indicator_v2/liquid_progress_indicator.dart';

class Indicator extends StatefulWidget {
  int count;
  Indicator({
    super.key,
    required this.count,
  });

  @override
  State<StatefulWidget> createState() => _Indicator();
}

class _Indicator extends State<Indicator> {
  @override
  Widget build(BuildContext context) {
    return Container(
        margin: const EdgeInsets.only(top: 40),
        width: 200,
        height: 200,
        child: LiquidCircularProgressIndicator(
          value: (widget.count / 100).toDouble(), // Defaults to 0.5.
          valueColor: const AlwaysStoppedAnimation(Color.fromARGB(
              255, 57, 249, 9)), // Defaults to the current Theme's accentColor.
          backgroundColor:
              Colors.white, // Defaults to the current Theme's backgroundColor.
          borderColor: const Color.fromARGB(255, 57, 249, 9),
          borderWidth: 2.0,
          direction: Axis
              .vertical, // The direction the liquid moves (Axis.vertical = bottom to top, Axis.horizontal = left to right). Defaults to Axis.vertical.
          center: Text(
            "${widget.count.toString()}%",
            style: const TextStyle(color: Colors.black, fontSize: 24),
          ),
        ));
  }
}
